﻿using System;
using System.Collections.Generic;

using E.BLL;
using E.Model;
using E.Web.UI.Page;

using X.Common;

namespace E.Web.Teacher.internals.publics.classes
{
    public partial class View : TeacherBasePage
    {
        public int id;
        public string act = "";
        public InternalPublicClassModel model = new InternalPublicClassModel();
        public IList<UserListModel> userList;
        public int count = 0;

        protected override void ShowPage()
        {
            id = XRequest.GetInt("id", -1);
            act = XRequest.GetString("act");

            ClassBLL bll = new ClassBLL();

            if (id != -1)
            {
                model = bll.GetInternalPublicClassInfoById(id);
                if (model.ID == -1)
                {
                    Alert("参数错误");
                    return;
                }
                else
                {
                    count = bll.GetInternalPublicClassUserCount(model.ID);
                }
            }
            else
            {
                Alert("参数错误");
                return;
            }

            if (act == "l")
            {
                userList = bll.GetUserListInInternalPublicClass(id);
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}
